﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Linq;

namespace Common.Utility
{
    class config
    {


        public static string GetConnectionStringValue(string key)
        {
            var appSettings = XDocument.Load(@"C:\Google Drive\AppSettings\FluentData.IntegrationTests\App.config");
            var addElements = appSettings.Element("configuration").Element("connectionStrings").Elements("add");
            var addElement = addElements.Single(x => x.Attribute("name").Value == key);
            return addElement.Attribute("connectionString").Value;
        }
    }
}
